* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    height: 100vh;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
}

.box {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    /* transform: rotateX(-30deg); */
    animation: animate 4s linear infinite;
}
.top{
    width: 300px;
    height: 300px;
    background: #151515;
    transform: rotateX(90deg) translateZ(150px);
}
.top::after{
    display: block;
    content: "";
    width: 300px;
    height: 300px;
    background: red;
    transform: translateZ(-450px);
    box-shadow: 0 0 120px 50px red
    ;
    filter: blur(20px);
}
@keyframes animate {
    0%{
        transform: rotateX(-30deg) rotateY(0deg);
    }
    100%{
        transform: rotateX(-30deg) rotateY(360deg);
    }
}
.box div{
    position: absolute;
    top:0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
  
}
.box div span{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:linear-gradient(#151515,red);
    transform: rotateY(calc(90deg * var(--i))) translateZ(150px);
    color:"red";
    font-size:80px;
   text-align: center;
   line-height: 300px;
   color: rgb(169, 157, 157);
}
.box1 {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    /* transform: rotateX(-30deg); */
    animation: animate 4s linear infinite;
    margin-left: 250px;
}
.top1{
    width: 300px;
    height: 300px;
    background: #151515;
    transform: rotateX(90deg) translateZ(150px);
}
.top1::after{
    display: block;
    content: "";
    width: 300px;
    height: 300px;
    background: greenyellow;
    transform: translateZ(-450px);
    box-shadow: 0 0 120px 50px greenyellow
    ;
    filter: blur(20px);
}

.box1 div{
    position: absolute;
    top:0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
  
}
.box1 div span{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:linear-gradient(#151515,greenyellow);
    transform: rotateY(calc(90deg * var(--i))) translateZ(150px);
    color:"red";
    font-size:80px;
   text-align: center;
   line-height: 300px;
   color: rgb(169, 157, 157);
}

.box2 {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    animation: animate 4s linear infinite;
    margin-left: 250px;
}
.top2{
    width: 300px;
    height: 300px;
    background: #151515;
    transform: rotateX(90deg) translateZ(150px);
}
.top2::after{
    display: block;
    content: "";
    width: 300px;
    height: 300px;
    background: aqua;
    transform: translateZ(-450px);
    box-shadow: 0 0 120px 50px aqua
    ;
    filter: blur(20px);
}

.box2 div{
    position: absolute;
    top:0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
  
}
.box2 div span{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:linear-gradient(#151515,aqua);
    transform: rotateY(calc(90deg * var(--i))) translateZ(150px);
    color:"red";
    font-size:80px;
   text-align: center;
   line-height: 300px;
   color: rgb(169, 157, 157);
}